package com.qf.api.point.feign;

import com.qf.api.config.FeignConfig;
import com.qf.api.point.dto.PointDTO;
import com.qf.api.point.dto.PointRetryDTO;
import com.qf.api.point.fallback.PointFallbackFactory;
import com.qf.common.core.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author zdl
 * @date 2025/3/27
 */
// configuration = FeignConfig.class 指定feign的配置类，实现token透传
@FeignClient(value = "micro-user",
        configuration = FeignConfig.class,
        fallbackFactory = PointFallbackFactory.class)
public interface PointFeignService {
    @PostMapping("/user/point/remote/add")
    R<?> remoteAddPoint(@RequestBody PointDTO pointDTO);

    @PostMapping("/user/point/remote/add2")
    R<?> remoteAddPoint2(@RequestParam("pointType") Integer pointType);

    @PostMapping("/user/point/remote/add3")
    R<?> remoteAddPoint3(@RequestParam("pointType") Integer pointType,@RequestParam("uid") Integer uid);

    @PostMapping("/user/point/retry/add")
    R<?> addPointRetry(@RequestBody PointRetryDTO pointRetryDTO);
}
